﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using HRProject.Code.Common;

namespace HRProject.Component
{
    public partial class SessionUser : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Login1.LoginButtonText = ContentProvider.GetString("LogIn");
            Login1.TitleText = ContentProvider.GetString("LogIn");
            Login1.UserNameLabelText = ContentProvider.GetString("UserName");
            Login1.PasswordLabelText = ContentProvider.GetString("Password");
            Login1.RememberMeText = ContentProvider.GetString("RememberMe");
            Login1.FailureText = ContentProvider.GetMessage("UnsuccessfullyOperationDetail").Replace("{0}", ContentProvider.GetString("LogIn"));
            CustomLoad();
        }

        public void CustomLoad()
        {
            if (Membership.GetUser() != null)
            {
                Login1.Visible = false;
            }
            else
            {
                accPanel.Visible = false;
            }
        }
    }
}